home *** CD-ROM | disk | FTP | other *** search
/ GameSpot.it / GameSpot Italia (2001).bin / demo / severancedemo / data1.cab / Program_Files / Maps / Ragnar_M2 / BurningKnights.py < prev    next >
Text File  |  2000-10-13  |  5KB  |  152 lines

  1. import def_class
  2. from math import pow
  3. import EnemyTypes
  4. import Actions
  5. import Bladex
  6. import pdb
  7. import Reference
  8. import Breakings
  9. import AniSound
  10. import math
  11. import AuxFuncs
  12. import Torchs
  13.  
  14. BoxBurnTime = 6                        # in Seconds
  15. BoxDestroyTime = 12                    # in Seconds
  16.  
  17.  
  18. #######################################################
  19. # Define the boxes
  20. #######################################################
  21. o=Bladex.CreateEntity("BKBox1","Caja_i_r",-89323.669384,-3260.840067,20582.370714)
  22. o.Static=0
  23. o.Scale=1.282432
  24. o.Orientation=0.425547,0.425547,0.564721,-0.564721
  25. o.CastShadows=0
  26. #o.NodesOrientation=?  En la siguiente versi≤n
  27. #o.Scripts=?  En la siguiente versi≤n
  28. Actions.SetBurnable(o.Name, BoxBurnTime, BoxDestroyTime)
  29. o.UseFunc = SetFireToBoxes
  30. #Breakings.SetBreakable("BKBox1", BoxDestroyTime, BoxDestroyTime+20.0)
  31.  
  32.  
  33. o=Bladex.CreateEntity("BKBox2","Caja_i_r",-90078.813308,-3274.676501,18282.632015)
  34. o.Static=0
  35. o.Scale=1.295256
  36. o.Orientation=0.615434,0.615434,0.348196,-0.348196
  37. o.CastShadows=0
  38. #o.NodesOrientation=?  En la siguiente versi≤n
  39. #o.Scripts=?  En la siguiente versi≤n
  40. Actions.SetBurnable(o.Name, BoxBurnTime, BoxDestroyTime)
  41. o.UseFunc = SetFireToBoxes
  42. #Breakings.SetBreakable("BKBox2", BoxDestroyTime, BoxDestroyTime+20.0)
  43.  
  44.  
  45. o=Bladex.CreateEntity("BKBox3","Caja_i_r",-89433.118286,-4693.084370,20301.464450)
  46. o.Static=0
  47. o.Scale=1.257163
  48. o.Orientation=0.410191,0.401885,0.574209,-0.583536
  49. o.CastShadows=0
  50. #o.NodesOrientation=?  En la siguiente versi≤n
  51. #o.Scripts=?  En la siguiente versi≤n
  52. Actions.SetBurnable(o.Name, BoxBurnTime, BoxDestroyTime)
  53. o.UseFunc = SetFireToBoxes
  54. #Breakings.SetBreakable("BKBox3", BoxDestroyTime, BoxDestroyTime+20.0)
  55.  
  56.  
  57. o=Bladex.CreateEntity("BKBox4","Caja_i_r",-89856.102240,-6069.592918,20357.480459)
  58. o.Static=0
  59. o.Scale=1.220190
  60. o.Orientation=0.426344,0.416480,0.562629,-0.572909
  61. o.CastShadows=0
  62. #o.NodesOrientation=?  En la siguiente versi≤n
  63. #o.Scripts=?  En la siguiente versi≤n
  64. Actions.SetBurnable(o.Name, BoxBurnTime, BoxDestroyTime)
  65. o.UseFunc = SetFireToBoxes
  66. #Breakings.SetBreakable("BKBox4", BoxDestroyTime, BoxDestroyTime+20.0)
  67.  
  68.  
  69. o=Bladex.CreateEntity("BKBox5","Caja_i_r",-90309.379150,-5241.130677,18348.379159)
  70. o.Static=0
  71. o.Scale=1.596263
  72. o.Orientation=0.567310,0.422235,-0.417931,-0.570273
  73. o.CastShadows=0
  74. #o.NodesOrientation=?  En la siguiente versi≤n
  75. #o.Scripts=?  En la siguiente versi≤n
  76. Actions.SetBurnable(o.Name, BoxBurnTime, BoxDestroyTime)
  77. o.UseFunc = SetFireToBoxes
  78. #Breakings.SetBreakable("BKBox5", BoxDestroyTime, BoxDestroyTime+20.0)
  79.  
  80.  
  81. ###################
  82. # Particle system #
  83. ###################
  84.  
  85. B_PARTICLE_GTYPE_BLEND=1
  86.  
  87. Bladex.AddParticleGType("LightDarkSmoke","SmokeParticle2",B_PARTICLE_GTYPE_BLEND,96)
  88.  
  89. for i in range(96):
  90.     if(i>96/2):
  91.         aux=0.0
  92.     else:
  93.         aux=(96/2.0-i)/(96/2.0)
  94.     r=17
  95.     g=17
  96.     b=17
  97.     a=255.0*math.sqrt(1.0-aux)
  98.     size=1000.0-(aux**2.0)*400.0
  99.     Bladex.SetParticleGVal("LightDarkSmoke",i,r,g,b,a,size)
  100.  
  101.  
  102.  
  103. #######################################################
  104. # Define the burning knight class
  105. #######################################################
  106.  
  107.  
  108. Bladex.AddCombustionDataFor("Knight_Traitor", "Fire", 250, 400, 4, 0.5, 1, 25)
  109.  
  110. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Tkn_burn.bmv","Tkn_burn",1,"Knight_Traitor")
  111. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Tkn_dth_burn.bmv","Tkn_dth_burn",0,"Knight_Traitor")
  112.  
  113.  
  114.  
  115. #######################################################
  116. # Create the burning knight
  117. # (named after 'brave' Sir Robin of the Holy Grail)
  118. #######################################################
  119. """
  120. MINSTREL:  [singing]  Bravely bold Sir Robin rode forth from Camelot.
  121.     He was not afraid to die, O brave Sir Robin.
  122.     He was not at all afraid to be killed in nasty ways,
  123.     Brave, brave, brave, brave Sir Robin!
  124.     
  125.     He was not in the least bit scared to be mashed into a pulp,
  126.     Or to have his eyes gouged out and his elbows broken,
  127.     To have his kneecaps split and his body burned away
  128.     And his limbs all hacked and mangled, brave Sir Robin!
  129.  
  130.     His head smashed in and his heart cut out
  131.     And his liver removed and his bowels unplugged
  132.     And his nostrils raped and his bottom burned off
  133.     And his pen--
  134. SIR ROBIN:  That's-- that's, uh-- that's enough music for now, lads.  Heh.
  135.     Looks like there's dirty work afoot.
  136. """
  137.  
  138. BKnightScream=Bladex.CreateSound('..\\..\\sounds\\grito-quemando1.wav', 'BurningKnightScream')
  139. BKnightScream.SendNotify=1
  140. BKnightScream.Volume=1
  141. BKnightScream.MinDistance =  5000
  142. BKnightScream.MaxDistance = 10000
  143.  
  144. enric=Bladex.CreateEntity("Robin","Knight_Traitor",-86250, -3800, 19000,"Person")
  145. enric.Angle=1.2
  146. #enric.ActionAreaMin=0
  147. #enric.ActionAreaMax=0
  148. enric.Data = def_class.BurningKnight (enric)
  149. #enric.AddAnimSound('Tkn_dth_burn', BKnightScream, 10)
  150. enric.SetOnFloor()
  151.  
  152.